package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.TravelLike;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelLikeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TravelLike record);

    TravelLike selectByPrimaryKey(Long id);

    List<TravelLike> selectAll(@Param("type") int type, @Param("targetId") Long targetId);

    int updateByPrimaryKey(TravelLike record);

    TravelLike selectByTravelIdAndUserId(@Param("travelId") Long travelId, @Param("userId") Long userId);

    void updataTravel(@Param("countLike") int countLike, @Param("travelId") Long travelId);

    int selectByLikeCount(Long travelId);

    void updateByStrate(@Param("id") Long id, @Param("state") Integer state);

    TravelLike selectByTravelIdAnduserId(@Param("travelId") Long travelId, @Param("userId") Long userId);

    void changeType(@Param("type") int type, @Param("targetId") Long targetId);
}